package com.itheima.worktwo1111;

import java.awt.*;

public class Circle implements ShapePara {
    //常量
    public final static double PI = 3.14;
    //成员变量
    public double radius;

    public Circle(double radius) {
        this.radius = radius;
    }

    public Circle() {
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }
    // 重写实现接口面积方法
    @Override
    public int getArea() {
        return (int) (PI * radius * radius);
    }

    // 重写实现接口周长方法
    @Override
    public int getCircumference() {
        return(int)(PI * 2 * radius);
    }
}
